<script>
$('start_modify').addEvent('click', function(){
    $('modify_body').setStyle('display', '');
    $('show').setStyle('display', 'none');
    $('modify_tr').setStyle('display', 'none');
});
$('close_modify').addEvent('click', function(){
    $('modify_body').setStyle('display', 'none');
    $('show').setStyle('display', '');
    $('modify_tr').setStyle('display', '');
});
</script>

<div class="tableform">
    <div class="division">
        
         <{if $detail.statement_status<>'2'}>
        
            <table width='100%' cellspacing="0" cellpadding="0">
                <tr>
                    <td colspan="4">付款单未结算</td>
                </tr>
            </table>
        
        <{else}>
        
        
        <table width='100%' cellspacing="0" cellpadding="0" id="show">
            
            <tr>
                <th>结算金额:</th>
                <td colspan="2">
                <{$detail.refund|cur}>
                </td>
            </tr>
            <tr>
                <th>银行帐号:</th>
                <td>
                <{$detail.bank_no}>
                </td>
                <th>结算方式：</th>
                <td>
                <{$detail.payments}>
                </td>
            </tr>
            
            <tr>
                <th>结算员:</th>
                <td>
                <{$username}>
                </select>
                </td>
                <th>结算日期：</th>
                <td>
                <{$detail.statement_time|date_format:"%Y-%m-%d"}>
                </td>
            </tr>
            
            <tr>
                <th>结算备注:</th>
                <td colspan="2">
                <{foreach from=$detail.memo item=items}>
				<div id="memo_show">
				<b><{$items.op_content|escape:"HTML"}></b> <{$items.op_time}> by <{$items.op_name}>
				</div>
				<{/foreach}>
                </td>
            </tr>
            </table>
        
		<div class="division" id="modify_body" style="display:none;">
		<form id="detail" action="index.php?<{$env.server.QUERY_STRING}>" method="post">
		<input type="hidden" name="refund_id" value="<{$detail.refund_id}>" />
        <table width='100%' cellspacing="0" cellpadding="0">
            
            <tr>
                <th>银行帐号:</th>
                <td>
                <{input type="text" name="bank_no" value=$detail.bank_no }>
                </td>
            </tr>
            
            <tr>
                <th>结算方式:</th>
                <td>
                <select name="payment">
                    <option value="">请选择</option>
                    <{foreach from=$payment item=item key=key}>
                    <option value="<{$item.id}>" <{if $item.id==$detail.payment}> selected <{/if}> ><{$item.custom_name}></option>
                    <{/foreach}>
                </select>
                </td>
            </tr>
            
            
            <tr>
                <th>追加备注:</th>
                <td colspan="3">
                <{input type="textarea" cols="80" rows="3" name="memo" }>
                </td>
            </tr>
            <tr>
                <th colspan="2">
                  <div class="table-action">
                  <{button class="btn-primary" type="submit" label="保存" }>
                  <{button class="btn-primary" type="button" id="close_modify" label="关闭" }>
                  </div>
                </th>
            </tr>
          </table>
          </form>
         </div>
          
          <div class="table-action" id="modify_tr">
                <{button class="btn-primary" id="start_modify" type="button" label="修改" }>
          </div>
          
          
        <{/if}>
   </div>
   </div>
   